package com.ldd.malphite.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;

@RestController
@RequestMapping("/file")
public class FileController {

    @PostMapping("/upload")
    public String uploadFile(MultipartFile file){
        try {
            file.transferTo(new File(""));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "";
    }
}
